package cn.itcast.service.impl;

import cn.itcast.dao.AccountDao;
import cn.itcast.domain.Account;
import cn.itcast.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceimpl implements AccountService {
	@Autowired
	private AccountDao accountDao;

	public List<Account> findAll() {
		return accountDao.findAll();
	}

	@Override
	public void save(Account account) {
		accountDao.save(account);
	}

	@Override
	public Account findById(Integer id) {
		return accountDao.findById(id);
	}

	@Override
	public void update(Account account) {
		accountDao.update(account);
	}

	@Override
	public void deleteById(Integer id) {
		accountDao.deleteById(id);
	}
}
